/* LocalStorage.java
 * Author: liuex
 * 2007-12-19 ����02:22:30
 *
 * Note: 
 */
package org.lex.app;

import java.io.File;

import org.lex.utils.SystemProperties;


public class LocalStorage {
	private File homeDirectory = null;

	public LocalStorage(String appid) {
		File userHome = new File(SystemProperties.userHome());
		homeDirectory = new File(userHome, "." + appid);
		if (false == homeDirectory.exists() || false == homeDirectory.isDirectory()) {
			boolean b = homeDirectory.mkdirs();
			if (false == b)
				homeDirectory = userHome;
		}
	}

	public File getApplicationHome() {
		return this.homeDirectory;
	}
}
